package c.a.a.d0;

import android.graphics.PointF;
import c.a.a.b0.j.e;
import c.a.a.b0.j.i;
import c.a.a.b0.j.m;
import c.a.a.d0.h0.c;
import c.a.a.d0.h0.c.b;
import c.a.a.e0.g;
import c.a.a.f;
import c.a.a.z.c.h;
import java.io.IOException;
import java.util.ArrayList;

/* compiled from: AnimatablePathValueParser */
public class a {
    public static c.a.a.d0.h0.c.a a = c.a.a.d0.h0.c.a.a("k", "x", "y");

    public static e a(c cVar, f fVar) throws IOException {
        ArrayList arrayList = new ArrayList();
        if (cVar.u0() == b.BEGIN_ARRAY) {
            cVar.n();
            while (cVar.t()) {
                arrayList.add(new h(fVar, p.a(cVar, fVar, g.c(), u.a, cVar.u0() == b.BEGIN_OBJECT)));
            }
            cVar.q();
            q.b(arrayList);
        } else {
            arrayList.add(new c.a.a.f0.a(o.b(cVar, g.c())));
        }
        return new e(arrayList);
    }

    public static m<PointF, PointF> b(c cVar, f fVar) throws IOException {
        b bVar = b.STRING;
        cVar.o();
        m<PointF, PointF> mVar = null;
        c.a.a.b0.j.b bVar2 = null;
        c.a.a.b0.j.b bVar3 = bVar2;
        Object obj = null;
        while (cVar.u0() != b.END_OBJECT) {
            int w0 = cVar.w0(a);
            if (w0 != 0) {
                if (w0 != 1) {
                    if (w0 != 2) {
                        cVar.x0();
                        cVar.y0();
                    } else if (cVar.u0() == bVar) {
                        cVar.y0();
                    } else {
                        bVar3 = b.i.b.f.K0(cVar, fVar);
                    }
                } else if (cVar.u0() == bVar) {
                    cVar.y0();
                } else {
                    bVar2 = b.i.b.f.K0(cVar, fVar);
                }
                obj = 1;
            } else {
                mVar = a(cVar, fVar);
            }
        }
        cVar.r();
        if (obj != null) {
            fVar.a("Lottie doesn't support expressions.");
        }
        if (mVar != null) {
            return mVar;
        }
        return new i(bVar2, bVar3);
    }
}
